Hello,
string TodayChange = null
void ClearSuspicions(Object obj)
{
Date td = null
string LastChangeLoc = null
Link lnk
for lnk in obj <-"*" do {
if (name(module(lnk)) != "child2parent" && name(module(lnk)) != "parent2child") continue
td = obj."Last Modified On"
LastChangeLoc = probeAttr_(lnk,"Last Modified By") "\t" dateOnly(td)""
if(LastChangeLoc == TodayChange){lnk."Suspicion Cleared Forwards" = dateAndTime(today())}
}
for lnk in obj ->"*" do {
if (name(module(lnk)) != "child2parent" && name(module(lnk)) != "parent2child") continue
td = obj."Last Modified On"
LastChangeLoc = probeAttr_(lnk,"Last Modified By") "\t" dateOnly(td)""
if(LastChangeLoc == TodayChange){lnk."Suspicion Cleared Backwards" = dateAndTime(today())}
}
}
void ClearOutgoingSuspicions(Object obj)
{
Link lnk = null
ModName_ targetMod = null
for lnk in obj ->"*" do {
if (name(module(lnk)) != "child2parent" && name(module(lnk)) != "parent2child") continue
targetMod = target lnk
Module mod = edit(fullName(targetMod), true,true)
if (null mod){errorBox("{Null} " fullName(targetMod))}else{ClearSuspicions(target lnk)}
}
}
bool FindMostRecentChangeByCurrentUser(Object obj)
{
bool ret = true
User u = find()
string uName = u.name
Date td = obj."Last Modified On"
string LastChange = probeAttr_(obj,"Last Modified By") "\t" dateOnly(td)""
td = today()
TodayChange = uName "\t" dateOnly(td)""
if(LastChange != TodayChange){ret = false}
return ret
}
void main(Object cObj)
{
if(FindMostRecentChangeByCurrentUser(cObj)){ClearOutgoingSuspicions(cObj)}
}
main(current Object)
SystemAdmin - Thu May 17 13:06:58 EDT 2012 |
Re: Suspect Links and deletion and read info I am not sure I understand your problem, but there is several things that seem weird to me. The first is, than in my experience when you create a link, it will normally NOT be suspicious (in fact it would make no sense to make it suspicious. The user probably created it for a reason). The logic for determining a suspect link is as far as I know:
The second thing is, that you might have the attributes "Suspicion Cleared Forwards" and "Suspicions Cleared Backwards" mixed up. "Suspicion Cleared Forwards" is as far as I know for outlinks, however you seem to set it for the in-links. The third thing is, that you should use lastModifiedTime() to determine the last modification date of stuff. Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS |
Re: Suspect Links and deletion and read info the following version of DOORS 9.3.0.7 does create a suspect link on the creation of links. Question is there and easy way on dumping the suspect links to a report prior to clearing them? I would like to have the ablitiy to create a report having the redline diff like in the GUI prior to clearing the suspect links. Thank you. -Jim |